# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        Young  
# Name:         demo1112
# Description:
# Author:       $赵怡蕾
# Date:         2019/4/3
#-------------------------------------------------------------------------------

import re

print('match------------------------')
m = re.match('python','I love python')    # match是从第一个开始找
if m is not None:
    print(m.group())
print(m)

print('search-----------------------')
m = re.search('python','I love python,高级语言 python')   # search直到找到一个字符串就返回
if m is not None:
    print(m.group())
print(m)